const mongoose = require('mongoose');
const stockSchema = new mongoose.Schema({
    '序号': { type: Number, required: true },
    '股票代码': { type: String, required: true },
    '股票简称': { type: String, required: true },
    '每股收益': { type: Number, required: true },
    '营业收入-营业收入': { type: Number, required: true },
    '营业收入-同比增长': { type: Number, required: true },
    '营业收入-季度环比增长': { type: Number, required: true },
    '净利润-净利润': { type: Number, required: true },
    '净利润-同比增长': { type: Number, required: true },
    '净利润-季度环比增长': { type: Number, required: true },
    '每股净资产': { type: Number, required: true },
    '净资产收益率': { type: Number, required: true },
    '每股经营现金流量': { type: Number, required: true },
    '销售毛利率': { type: Number, required: true },
    '所处行业': { type: String, required: true },
    '最新公告日期': { type: Number, required: true },
});

// 创建Model
const Stock = mongoose.model('nbdata', stockSchema, 'nbdata');


const hySchema = new mongoose.Schema({
    '所处行业': { type: String, required: true },
    'count': { type: Number, required: true },
});

// 创建Mode
const hydata = mongoose.model('industries', hySchema,'industries');


module.exports = { Stock ,hydata};